home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / minix / libsrc~1.z / libsrc~1 / lseek.c < prev    next >
Encoding:
C/C++ Source or Header  |  1989-12-28  |  274 b   |  17 lines

  1. #include "lib.h"
  2. #define OK 0
  3.  
  4. PUBLIC long lseek(fd, offset, whence)
  5. int fd;
  6. long offset;
  7. int whence;
  8. {
  9.   int k; 
  10.   M.m2_i1 = fd;
  11.   M.m2_l1 = offset;
  12.   M.m2_i2 = whence;
  13.   k = callx(FS, LSEEK);
  14.   if (k != OK) return( (long) k);    /* send itself failed */
  15.   return(M.m2_l1);
  16. }
  17.